<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
   <% String path=request.getContextPath(); 
   String basePath=request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; 
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="<%=basePath%>">
<title>推送数据查询</title>
<style type="text/css">
.table_car{ width:99.5%; border-left:1px #bbcddb solid; border-top:1px #bbcddb solid; background-color:#f6f7f9;font-size: 12px;border-bottom :0px auto;}
.table_car th{background:url(../images/centent_1.jpg) repeat-x; color:#343233; width:11%; text-align:center; line-height:26px; border-bottom:1px #bbcddb solid; border-right:1px #bbcddb solid; background-color:#f6f7f9;}
.table_car td{text-align:center; line-height:26px;border-right:1px #bbcddb solid;}
.table_car .table_car td, .table_car .content_table_1 td{padding-left: 2px;padding-right: 2px}
</style>
<jsp:include page="/WEB-INF/jsp/common/common.jsp"></jsp:include>
<script type="text/javascript" src="<%=path%>/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="<%=path%>/js/jquery.ztree.excheck-3.5.js"></script>
<script src="<%=path%>/js/jquery.divbox.js" type="text/javascript"></script>
<script>
/**
 * 页面初始化查询推送数据
 */
function carPushDataQuery(){
	var carVin = $('#CAR_VIN').val();
	if("" == carVin){
		$.message("error","请输入车架号！");
		return;
	}
	$.openLoading();
	$.ajax({
		url : "<%=path%>/carDataManagement/carPushDateQuery",
		type : 'POST',
		async : true,
		data:{"carVin":carVin},
		dataType:'json',
		success:function(data){
			var tableObj = $("#carDataTable");
			tableObj.find("tbody").remove();
			$.closeLoading();
				if(null != data){
					if("" != data.message){
						$.message(data.result,data.message)
						return;
					}
					var fieldNames="";
					if("03"==data.data[0].pushStatus){
						fieldNames = "carBrand?{'01':'一汽奥迪';'02':'一汽大众';'03':'一汽捷达';'04':'东风日产'},syPolno,jqPolno,carVin,serviceCode,dealerCode,dealerName,isNewCar?{'01':'是';'02':'否';'0':'否';'1':'是'},pushDate,pushStatus?{'01':'待发送';'02':'成功';'03':'失败';'04':'其他'},pushStatusDepict";
						$("#depictId").attr("style","display:block");
						$("#depictId").attr("style","width:12.5%");
					}else{
						fieldNames = "carBrand?{'01':'一汽奥迪';'02':'一汽大众';'03':'一汽捷达';'04':'东风日产'},syPolno,jqPolno,carVin,serviceCode,dealerCode,dealerName,isNewCar?{'01':'是';'02':'否';'0':'否';'1':'是'},pushDate,pushStatus?{'01':'待发送';'02':'成功';'03':'失败';'04':'其他'}";
						$("#depictId").attr("style","display:none");
					}
					var tableContent = creatTable4(fieldNames,data);
					tableObj.append(tableContent);
			}
		}
	});
}
</script>
</head>
<body onmouseover="this.style.cursor='pointer';this.style.cursor='hand'">
	<div class="current">
           <table class="current_table_1">
              <tbody><tr class="f2">
                <td><img src="./images/current_1.jpg"></td>
                  <td class="current_table_1_td">
                  <img src="images/current_1.png">&nbsp;您现在的位置：&nbsp;
                  <span style=" color:#136bab; ">车险数据管理
                  <span style="padding:0 5px; font-weight:bold; line-height:28px;">&gt;</span>推送数据查询
                  </span>
                  </td>
                  <td><img src="./images/current_3.jpg"></td>
              </tr>
           </tbody></table>
      </div>
	<div style="width: 100%;margin-left:5px;">
	<table border="100px" class="table_car" style="width: 100%;">
  		<tr height="60px">
  			<td colspan="2" align="center">
				车架号：&nbsp;<input id="CAR_VIN" style="width: 150px;" class="input_text"/>&nbsp;&nbsp;
				<input type="button" id="queryDataBtn" class="input_button_2" style="width:50px;" value="查询" onclick="carPushDataQuery()" onmouseover="this.style.cursor='pointer';this.style.cursor='hand'"/>
			</td>
  		</tr>
  	</table>
  	</div>
	<div style="width: 100%; margin-left: 5px; margin-top: 0px;">
		<table border="1" class="table_02" style="width: 100%; height: 100px; margin-top: 0px;">
			<tr>
				<td valign="top">
					<div id="dataDiv" style="width: 100%; margin: 5px; overflow: scroll;">
						<table class="table_02" id="carDataTable">
							<thead>
								<tr>
									<th style="width: 6%">车辆品牌</th>
									<th style="width: 11%">商业险保单号</th>
									<th style="width: 11%">交强险保单号</th>
									<th style="width: 9%">车架号</th>
									<th style="width: 9%">服务代码</th>
									<th style="width: 7%">经销商代码</th>
									<th style="width: 14%">经销商名称</th>
									<th style="width: 5.5%">是否新车</th>
									<th style="width: 5.5%">推送日期</th>
									<th style="width: 5.5%">推送状态</th>
									<th id="depictId" style="display: none">推送状态描述</th>
								</tr>
							</thead>
							<tbody>
							</tbody>
						</table>
					</div>
				</td>
			</tr>
		</table>
	</div>
</body>
</html>
